/**
 * futures : masterlink.futures.dao.GroupDao.java
 */
package masterlink.futures.dao;

import java.util.List;

import masterlink.futures.vo.Account;
import masterlink.futures.vo.FutpabReal;
import masterlink.futures.vo.FutpabReal.FutpabRealPk;
import masterlink.futures.vo.GreekConclusion;
import masterlink.futures.vo.Group;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

/**
 * TODO Write the description
 *
 * @author : tonyyang
 * Create date : 2011/10/25
 * @version 1.0.0	
 */
@Repository
@Qualifier("FutpabRealDao")
public class FutpabRealDao extends TimesTenHibernateDao<FutpabReal,FutpabRealPk> {
	
//	private static final String FIND_BY_GROUP="select b.*,c.* from greeks_limit a,fuminv b, futpabreal c where a.account=b.acno and a.broker=b.broker_id and a.account=c.acno(+) and a.broker=c.broker_id(+) and c.tag2=1 and a.id=?";
//	private static final String FIND_BY_ACC="select b.*,c.* from greeks_limit a,fuminv b, futpabreal c where a.account=b.acno and a.broker=b.broker_id and a.account=c.acno(+) and a.broker=c.broker_id(+) and c.tag2=1 and a.id=? and a.account=?";
//	
//	@SuppressWarnings("unchecked")
//	public List<FutpabReal> findByGroup(Group group) {
//		if(group!=null){
//			return (List<FutpabReal>) super.executeQuery(createSqllQuery(FIND_BY_GROUP).addEntity(GreekConclusion.class), group.getId());
//		}
//		return null;
//	}
//	
//	@SuppressWarnings("unchecked")
//	public List<FutpabReal> findByAccount(Group group,Account acc) {
//		if(group!=null&&acc!=null){
//			return (List<FutpabReal>) super.executeQuery(createSqllQuery(FIND_BY_ACC).addEntity(GreekConclusion.class), group.getId(),acc.getId().getAcno());
//		}
//		return null;
//	}
}
